#app {

  .main-container {
    min-height: 80%;
    transition: margin-left 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    margin-left: $sideBarWidth;
    position: relative;
  }

  .sidebar-container-wrapper {
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 1001;
    overflow: hidden;

    // Enhanced glassmorphism effect
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2),
    inset 0 2px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1px 1px rgba(0, 0, 0, 0.05);
    border-radius: 18px;

    .sidebar-container {
      height: 100%;
      width: 100%;
    }
  }

  .sidebar-container {
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    width: 100% !important;
    height: 100%;
    font-size: 0px;
    overflow: hidden;

    // Enhanced glassmorphism effect
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2),
    inset 0 2px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1px 1px rgba(0, 0, 0, 0.05);
    border-radius: 18px;

    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
      border-bottom-left-radius: 18px;
      border-bottom-right-radius: 18px;

      // 当内容较少时居中显示菜单项
      display: flex;
      flex-direction: column;

      ::v-deep .el-scrollbar__wrap {
        display: flex;
        flex-direction: column;

        .el-menu {
          flex: 1;
          display: flex;
          flex-direction: column;

          // 内容较少时居中显示
          &.el-menu--vertical {
            justify-content: flex-start;
          }

          // 调整菜单项间距，减少底部留白
          .el-menu-item,
          .el-submenu {
            margin-bottom: 3px;
          }

          // 最后一个菜单项不需要底部边距
          .el-menu-item:last-child,
          .el-submenu:last-child {
            margin-bottom: 0;
          }
        }
      }
    }

    .el-scrollbar {
      height: 100%;
      border-bottom-left-radius: 18px;
      border-bottom-right-radius: 18px;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 50px);
      }
    }

    .is-horizontal {
      display: none;
    }

    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }

    .svg-icon {
      margin-right: 16px;
    }

    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }

    .el-menu {
      border: none;
      min-height: 100%;
      width: 100% !important;
      background-color: transparent;

      // 优化菜单展开动画，使用更优雅的缓动函数
      .el-submenu__title,
      .el-menu-item {
        transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
        transform: translateZ(0);
        backface-visibility: hidden;
        border-radius: 14px;
        margin: 4px 10px;
        background: transparent;
        position: relative;

        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          background: rgba(255, 255, 255, 0.15);
          z-index: -1;
          border-radius: 14px;
          backdrop-filter: blur(6px);
          -webkit-backdrop-filter: blur(6px);
        }
      }

      .el-menu-item {
        &.is-active {
          background: linear-gradient(120deg, rgba(64, 158, 255, 0.15), rgba(64, 158, 255, 0.1)) !important;
          color: $subMenuActiveText !important;
          backdrop-filter: blur(12px);
          -webkit-backdrop-filter: blur(12px);

          &::before {
            background: linear-gradient(120deg, rgba(64, 158, 255, 0.15), rgba(64, 158, 255, 0.1));
          }
        }
      }
    }

    // menu hover
    .submenu-title-noDropdown,
    .el-submenu__title {
      border-radius: 14px;
      margin: 4px 10px;
      transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
      position: relative;
      overflow: hidden;
      background: transparent;

      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(120deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
        z-index: -1;
        border-radius: 14px;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
      }

      &:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08),
        inset 0 2px 2px rgba(255, 255, 255, 0.4);
        transform: translateY(-2px);
      }
    }

    .is-active > .el-submenu__title {
      background: linear-gradient(120deg, rgba(64, 158, 255, 0.15), rgba(64, 158, 255, 0.1)) !important;
      color: $subMenuActiveText !important;
      border-radius: 14px;
      margin: 4px 10px;
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08),
      inset 0 2px 2px rgba(255, 255, 255, 0.4);
      transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);

      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(120deg, rgba(64, 158, 255, 0.15), rgba(64, 158, 255, 0.1));
        z-index: -1;
        border-radius: 14px;
      }
    }

    & .nest-menu .el-submenu > .el-submenu__title,
    & .el-submenu .el-menu-item {
      min-width: $sideBarWidth !important;
      background: transparent !important;
      border-radius: 14px;
      margin: 4px 10px;
      transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);

      &:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08),
        inset 0 2px 2px rgba(255, 255, 255, 0.4);
        transform: translateY(-2px);
      }
    }
  }

  .hideSidebar {
    .sidebar-container-wrapper {
      width: $sideBarCollapseWidth !important;
      height: $sideBarMinHeight !important;
      top: 50%;
      transform: translateY(-50%);
    }

    .main-container {
      margin-left: $sideBarCollapseWidth;
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      height: 50px; // 添加固定高度以确保垂直居中

      .el-tooltip {
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;

        .svg-icon {
          margin-left: 0;
          margin-right: 0;
          width: 1.2rem;
          height: 1.2rem;
        }

        .sub-el-icon {
          margin-left: 0;
          margin-right: 0;
          width: 1.2rem;
          height: 1.2rem;
        }
      }
    }

    .el-submenu {
      & > .el-submenu__title {
        padding: 0 !important;
        text-align: center;

        .svg-icon {
          margin-left: 0;
          margin-right: 0;
          width: 1.2rem;
          height: 1.2rem;
        }

        .sub-el-icon {
          margin-left: 0;
          margin-right: 0;
          width: 1.2rem;
          height: 1.2rem;
        }

        span {
          height: 0;
          width: 0;
          overflow: hidden;
          visibility: hidden;
          transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
        }
      }
    }

    .el-menu--collapse {
      .el-submenu {
        & > .el-submenu__title {
          & > span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $sideBarCollapseWidth !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform .28s;
      width: $sideBarWidth !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$sideBarWidth, 0, 0);
      }
    }
  }

  .withoutAnimation {

    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  & > .el-menu {
    .svg-icon {
      margin-right: 16px;
    }

    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }
  }

  .nest-menu .el-submenu > .el-submenu__title,
  .el-menu-item {
    &:hover {
      // you can use $subMenuHover
      background-color: $menuHover !important;
      transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    }
  }

  // the scroll bar appears when the subMenu is too long
  > .el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;
    border-radius: 14px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.15);

    &::-webkit-scrollbar-track-piece {
      background: rgba(211, 220, 230, 0.2);
      border-radius: 8px;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: rgba(153, 169, 191, 0.5);
      border-radius: 3px;
    }

    .el-menu-item {
      background: transparent;
      position: relative;

      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.1);
        z-index: -1;
        border-radius: 14px;
      }

      &:hover {
        background: rgba(255, 255, 255, 0.2) !important;
      }

      &.is-active {
        background: linear-gradient(120deg, rgba(64, 158, 255, 0.15), rgba(64, 158, 255, 0.1)) !important;
        color: $subMenuActiveText !important;

        &::before {
          background: linear-gradient(120deg, rgba(64, 158, 255, 0.15), rgba(64, 158, 255, 0.1));
        }
      }
    }
  }
}
